//封装防抖函数  
export const debounce = (fn, delay) => {
    let timer = null;
    return function() {
        if(timer !== null){
            clearTimeout(timer)
        }
        timer = setTimeout(() => {
            fn.call(this,arguments)
        }, delay)
    }
}